import React, { BaseSyntheticEvent } from 'react';
import { Image, ImageBackground, Text, TouchableOpacity, View } from 'react-native';
import { Icon } from 'react-native-elements';


export default function tpl(a: <T>(action: string, ...args: unknown[]) => ((ev: BaseSyntheticEvent<T>) => void), s: (...class_names: string[]) => {}, d: (d: string) => unknown) {
	const arr0 = d('d') as { headimg: string, count: string, teacher_name: string, imaging: string };
	if (arr0) {
		return (
			<View style={{ height: '100%' }}>
				<View>
					<ImageBackground source={require('../../imgs/main.jpg')} style={{ width: '100%', height: 100, paddingTop: 10 }}>
						<View style={{ justifyContent: 'center', alignItems: 'center' }}>
							{(() => {
								if (arr0.headimg) {
									return (<Image source={{ uri: arr0.imaging }} style={{ width: 50, height: 50, borderRadius: 50 }} />);
								} else {
									return (<Image source={require('../../imgs/nan.jpg')} style={{ width: 50, height: 50, borderRadius: 50 }} />);
								}
							})()}
						</View>
						<View style={{ justifyContent: 'center', alignItems: 'center', marginTop: 5 }}>
							<Text style={{ color: '#fff', fontSize: 18 }}>{arr0.teacher_name}</Text>
						</View>
					</ImageBackground>
				</View>
				<View>
					<TouchableOpacity onPress={a('a002')}>
						<View style={s('ht1')}>
							<View style={s('tuicon')}>
								<Image
									source={require('../../imgs/jbxx.png')} style={s('tu1')}
								/>
								<Text onPress={a('a002')} style={s('textL')}>基本信息</Text>
							</View>
							<View style={{ position: 'absolute', right: 0, top: 10, height: 30 }}>
								<Icon name="chevron-right" color="#999999" size={30}></Icon>
							</View>
						</View>
					</TouchableOpacity>
					<TouchableOpacity onPress={a('a003')}>
						<View style={s('ht1')}>
							<View style={s('tuicon')}>
								<Image
									source={require('../../imgs/qingjia.jpg')} style={s('tu1')}
								/>
								<Text onPress={a('a003')} style={s('textL')}>我的课时</Text>
							</View>
							<Text style={s('textR')}>已有时长：<Text style={s('textR')}>{arr0.count}</Text>课时</Text>
							<View style={{ position: 'absolute', right: 0, top: 10, height: 30 }}>
								<Icon name="chevron-right" color="#999999" size={30}></Icon>
							</View>
						</View>
					</TouchableOpacity>
					<TouchableOpacity onPress={a('a004')}>
						<View style={s('ht1')}>
							<View style={s('tuicon')}>
								<Image
									source={require('../../imgs/bzzy.png')} style={s('tu1')}
								/>
								<Text onPress={a('a004')} style={s('textL')}>布置作业</Text></View>
							<View style={{ position: 'absolute', right: 0, top: 10, height: 30 }}>
								<Icon name="chevron-right" color="#999999" size={30}></Icon>
							</View>
						</View>
					</TouchableOpacity>
					<TouchableOpacity onPress={a('a005')}>
						<View style={s('ht1')}>
							<View style={s('tuicon')}>
								<Image
									source={require('../../imgs/khdp.png')} style={s('tu1')}
								/>
								<Text onPress={a('a005')} style={s('textL')}>课后点评</Text></View>
							<View style={{ position: 'absolute', right: 0, top: 10, height: 30 }}>
								<Icon name="chevron-right" color="#999999" size={30}></Icon>
							</View>
						</View>
					</TouchableOpacity>
					<TouchableOpacity onPress={a('a006')}>
						<View style={s('ht1')}>
							<View style={s('tuicon')}>
								<Image
									source={require('../../imgs/wdkb.png')} style={s('tu1')}
								/>
								<Text onPress={a('a006')} style={s('textL')}>我的课表</Text></View>
							<View style={{ position: 'absolute', right: 0, top: 10, height: 30 }}>
								<Icon name="chevron-right" color="#999999" size={30}></Icon>
							</View>
						</View>
					</TouchableOpacity>
					<TouchableOpacity onPress={a('a007')}>
						<View style={s('ht1')}>
							<View style={s('tuicon')}>
								<Image
									source={require('../../imgs/xxgl.png')} style={s('tu1')}
								/>
								<Text onPress={a('a007')} style={s('textL')}>学生管理</Text></View>
							<View style={{ position: 'absolute', right: 0, top: 10, height: 30 }}>
								<Icon name="chevron-right" color="#999999" size={30}></Icon>
							</View>
						</View>
					</TouchableOpacity>
					<TouchableOpacity onPress={a('a008')}>
						<View style={s('ht1')}>
							<View style={s('tuicon')}>
								<Image
									source={require('../../imgs/shengpi.png')} style={s('tu1')}
								/>
								<Text onPress={a('a008')} style={s('textL')}>请假审批</Text></View>
							<View style={{ position: 'absolute', right: 0, top: 10, height: 30 }}>
								<Icon name="chevron-right" color="#999999" size={30}></Icon>
							</View>
						</View>
					</TouchableOpacity>
				</View>
				<View style={{ position: 'absolute', bottom: 0, backgroundColor: '#f4f4f4', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
					<Text style={{ height: 25, lineHeight: 25 }}>联系我们：15812345678</Text>
					<Text style={{ height: 25, lineHeight: 25 }}>安贝星</Text>
				</View>
			</View>
		);
	} else {
		return (
			<View ></View>
		);
	}
}
